﻿using UnityEngine;

public class TestBoard : MonoBehaviour
{
    [ContextMenu("Test")]
    void Test()
    {
        Game game = new Game();
        game.Start();
        int blueX = 0;
        while (!game.m_GameOver)
        {
            int actionId = Random.Range(0, game.m_Board.m_EmptyCells.Count);
            Vector2Int placePos = game.m_Board.m_EmptyCells[actionId];
            if (game.m_CurrentPlayer == Player.Blue)
            {
                placePos = new Vector2Int(blueX, 0);
                blueX++;
            }
            else
            {
                if (placePos.y == 0) placePos.y = 1;
            }
            Debug.Log($"{game.m_CurrentPlayer} place at {placePos}");
            game.Step(placePos);
        }
        Debug.Log($"{game.m_Winner} win");
    }
}